# 6-1 人
people = {'first_name': 'h', 'last_name': 'z', 'age': '23', 'city': 'shenzhen'}
print(people)

# 6-2 喜欢的数字
numbers = {'captain': '1',
           'ewa': '2',
           'wali': '3',
           'Sherlock Holmes': '4',
           'John·H·Watson': '5'}
print("Captain,你喜欢 " + numbers['captain'].title() + " 这个数字吗？")
print("ewa,你喜欢 " + numbers['ewa'].title() + " 这个数字吗？")
print("wali,你喜欢 " + numbers['wali'].title() + " 这个数字吗？")
print("Sherlock Holmes,你喜欢 " + numbers['Sherlock Holmes'].title() + " 这个数字吗？")
print("John·H·Watson,你喜欢 " + numbers['John·H·Watson'].title() + " 这个数字吗？")

# 6-3 词汇表
vocabulary = {
    'if': '判断',
    'for': '循环',
    'remove': '移除',
    'del': '删除',
    'add': '添加',
}
# print("\n",vocabulary)

print('if:', "\n", vocabulary['if'])
print('for:', "\n", vocabulary['for'])
print('remove:', "\n", vocabulary['remove'])
print('del:', "\n", vocabulary['del'])
print('add:', "\n", vocabulary['add'])

# 6-4 词汇表2
print("\n")
vocabulary = {
    'if': '判断',
    'for': '循环',
    'remove': '移除',
    'del': '删除',
    'add': '添加',
    'set': '设置',
    'print': '输出',
    'value': '值',
    'key': '键',
    'sorted': '分类',
}

for name, term in vocabulary.items():
    print("\nname: " + name)
    print("term: " + term)

# 6-5 河流
river = {
    'yellow river': 'china',
    'Mississippi River': 'Atlantic',
    'nile': 'egypt'
}
for r, c in river.items():
    print("The " + r.title() + " runs trough " + c.title())

print("\n")
for r in river.keys():
    print(r.title())

print("\n")
for c in river.values():
    print(c.title())

# 6-5 调查
print("\n")
favorite_languages = {
    'jen': 'python',
    'sarah': 'c',
    'edward': 'ruby',
    'phil': 'python',
}

print("Thank you for your inverstigation: ")
for language in set(favorite_languages.values()):
    print(language.title())


user_0 = {
    'username': 'efermi',
    'first': 'enrico',
    'flast': 'fermi'
}

print("\n")
print("Please accept your investigation：")
for inversigation in user_0.keys():
    print(inversigation.title())